package com.fafu.ioc.controller;

import com.fafu.ioc.config.StudentConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@RequestMapping("/yml")
@Controller
@ResponseBody
public class YmlController {
    //属性注入进来
    @Autowired
    private StudentConfig studentConfig;
    @RequestMapping("/readObject")
    //返回一个toString
    public String readObject(){
        return studentConfig.toString();
    }
}
